import qs from "qs";
import dayjs from "dayjs";
import { getUrlParams } from "./baseInfo";
import { fetchWrapper } from "@/app/cg06/api/common";

const pathMap = {
  dev: '/dev-api',
  staging: '/uat-api',
  prod: '/prod-api',
};
const env = (process.env.NEXT_PUBLIC_APP_ENV || 'prod') as
  | 'dev'
  | 'staging'
  | 'prod';

const envTest =
  typeof window !== 'undefined' &&
  (new URL(window.location.href).searchParams.get('env') as typeof env);

console.log(envTest, 'envTest');
const envFinale = env == 'prod' ? env : envTest || env;
const path = pathMap[envFinale];

const wmsPath = path;
const reportPath = path + "-report";



/**仓库地图信息 */
export function globalInfoApi() {
  return fetchWrapper<any>(
    `/big-screen/screen/warehouseData/list`,
    undefined,
    "GET"
  );
}
